let proxyObj = {}

proxyObj['/']={
    //websocket
    ws:false,
    //目标地址
    target:'http://localhost:8081',
    //发送请求头host会被设置target
    changeOrigin:true,
    //不重写请求路径
    pathRewrite:{
        '^/': '/'
    }
}

proxyObj['/']={
    ws:true,
    target:'ws://localhost:8081'
}

module.exports = {
    devServer: { // 环境配置
        host: 'localhost',
        port: 8080,
        proxy: proxyObj
    }
}
